﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;
using System.Windows.Data;
using MyPublisher.Administration.Commands;
using System.Windows.ApplicationFramework;
using System.Collections.ObjectModel;
using MyPublisher.Administration.Model;

namespace MyPublisher.Administration.ViewModels
{
    public class ConfigurationElement
    {
        public string Name { get; set; }
        public ObservableCollection<IView> Views { get; private set; }
        public ObservableCollection<ConfigurationElement> Items { get; private set; }

        public ConfigurationElement()
            : this("",null)
        {
        }
        public ConfigurationElement(string name)
            : this(name, null)
        {
        }
        public ConfigurationElement(string name, ViewModel viewModel)
        {
            this.Name = name;
            this.Views = new ObservableCollection<IView>();
            if (viewModel != null)
            {
                this.Views.Add(viewModel.View);
            }
            this.Items = new ObservableCollection<ConfigurationElement>();
        }
    }
}
